Biomaterials that can form gels in situ are useful for a variety of applications, such as, for example, injectable matrices for controlled drug delivery, injectable scaffolds for tissue engineering, or adhesives to bond tissue or seal gaseous or fluid leaks in a physiological environment.